package com.hand.controller;


import com.hand.entity.User;
import com.hand.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Created by 86136 on 2019/7/15.
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/insertUser")
    public String getUser(@RequestParam User user){
        return userService.insertUser(user);
    }
    @RequestMapping("deleteUser")
    public String deleteUser(@RequestBody long userId){
        return userService.deleteUser(userId);
    }
    @RequestMapping("updateUser")
    public String updateUser(@RequestParam User user){
        return userService.updateUser(user);
    }
/*
    @RequestMapping("findAll")
    public List<User> listAll(){
        return userService.findAll();
    }
*/

}
